package chp07.homework;

import java.util.Scanner;

public class Home1 {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("输入5句话");
        String[] arr = new String[5];
        for (int i = 0; i < arr.length; i++) {
            System.out.print("第"+(i+1)+"句话:");
            arr[i] = input.next();
        }

        System.out.println("\n逆序输出");
        for (int i = arr.length-1; i >= 0; i--){
            System.out.println(arr[i]);
        }
    }
}
